package homework;

import java.util.Objects;
import java.util.Scanner;

public class Password {
    String zhanghao,mima;

    public void show(){
        Scanner input=new Scanner(System.in);
        System.out.print("输入你的账号：");
        zhanghao=input.next();
        System.out.print("输入你的密码：");
       mima=input.next();

        while (true){
            if (zhanghao.equals("aaa")&&mima.equals("aaa")){
                System.out.print("请输入你的新密码：");
                mima=input.next();
                System.out.println("修改成功");
                break;
            }else {
                System.out.println("账号或密码错误重新输入");
                show();
            }
        }
    }
}
